﻿namespace EveKillboard.Core.Views
{
    using System.ComponentModel.DataAnnotations;

    public interface IAllianceStats {}
    public interface ICorporationStats{}
    public interface ICharacterStats {}

    public abstract class EntityStats
    {
        public abstract int InternalId { get; set; }
        public abstract string Name { get; set; }
        public abstract int EveId { get; set; }
        public abstract int KillsCount { get; set; }
        public abstract int LossesCount { get; set; }
        public abstract decimal? KillsValue { get; set; }
        public abstract decimal? LossesValue { get; set; }
    }

    [Table("AllianceStats")]
    public sealed class AllianceStats : EntityStats, IAllianceStats
    {
        [Key]
        [Column("AllianceInternalID")]
        public override int InternalId { get; set; }
        [Column("AllianceName")]
        public override string Name { get; set; }
        [Column("AllianceID")]
        public override int EveId { get; set; }
        [Column("KillsCount")]
        public override int KillsCount { get; set; }
        [Column("LossesCount")]
        public override int LossesCount { get; set; }
        [Column("KillsValue")]
        public override decimal? KillsValue { get; set; }
        [Column("LossesValue")]
        public override decimal? LossesValue { get; set; }
    }

    [Table("CorporationStats")]
    public sealed class CorporationStats : EntityStats, ICorporationStats
    {
        [Key]
        [Column("CorporationInternalID")]
        public override int InternalId { get; set; }
        [Column("CorporationName")]
        public override string Name { get; set; }
        [Column("CorporationID")]
        public override int EveId { get; set; }
        [Column("KillsCount")]
        public override int KillsCount { get; set; }
        [Column("LossesCount")]
        public override int LossesCount { get; set; }
        [Column("KillsValue")]
        public override decimal? KillsValue { get; set; }
        [Column("LossesValue")]
        public override decimal? LossesValue { get; set; }
    }

    [Table("CharacterStats")]
    public sealed class CharacterStats : EntityStats, ICharacterStats
    {
        [Key]
        [Column("CharacterInternalID")]
        public override int InternalId { get; set; }
        [Column("CharacterName")]
        public override string Name { get; set; }
        [Column("CharacterID")]
        public override int EveId { get; set; }
        [Column("KillsCount")]
        public override int KillsCount { get; set; }
        [Column("LossesCount")]
        public override int LossesCount { get; set; }
        [Column("KillsValue")]
        public override decimal? KillsValue { get; set; }
        [Column("LossesValue")]
        public override decimal? LossesValue { get; set; }
    }
}